#!/usr/bin/env ruby
$:.unshift File.join(File.dirname(File.dirname(__FILE__)), 'lib')
require 'skit/health'
require 'skit/health/check/amqp'
require 'skit/health/check/activerecord'

Skit::Health.enable_debug # optional

Skit::Health.run_server('/tmp/skit-health.sock') do
  Skit::Health::Check::AMQP.check!('test-app')
  Skit::Health::Check::ActiveRecord.check!
  raise 'Custom fail' if rand > 0.5
  'OK'
end
